# - Try to find rockchip-linux mpp library
#

set(MPP_VERSION 20190904_1.00)

find_path(MPP_INCLUDE_DIR vpu.h
   HINTS ${PREBUILT_LIBRARIES}/mpp-${MPP_VERSION}/include
)

find_library(MPP_LIBRARY NAMES librockchip_mpp.so
   HINTS ${PREBUILT_LIBRARIES}/mpp-${MPP_VERSION}/linux/${CMAKE_SYSTEM_PROCESSOR}/lib
)

set(MPP_LIBRARIES ${MPP_LIBRARY} )
set(MPP_INCLUDE_DIRS ${MPP_INCLUDE_DIR} )

include(FindPackageHandleStandardArgs)

# handle the QUIETLY and REQUIRED arguments and set MPP_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(MPP DEFAULT_MSG MPP_LIBRARY MPP_INCLUDE_DIR)

mark_as_advanced(MPP_INCLUDE_DIR MPP_LIBRARY)
